<!DOCTYPE html>
<html lang="en">
<head>
	{% block head %}
		{% block scripts %}
			<meta charset="UTF-8">
			<link rel="stylesheet" href="{{ settings.assets_url }}css/bootstrap.css">
			<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
			<script src="{{ settings.assets_url }}javascript/bootstrap.min.js"></script>
			<script src="{{ settings.assets_url }}javascript/admin.min.js"></script>
			<script src="{{ settings.assets_url }}javascript/jquery.cookie.js"></script>
			<script src="{{ settings.assets_url }}javascript/jquery.debounce.js"></script>
			<script src="{{ settings.assets_url }}javascript/jquery.redirect.min.js"></script>
			<script src="{{ settings.assets_url }}javascript/socket.io.min.js"></script>
		{% endblock %}
		<title>{{ settings.company_name }} Admin Control Panel - {% block title %}{% endblock %}</title>
	{% endblock %}
</head>
<body>
	<div class="container">
		<div class="pull-right" style="margin-top: -26px;">
			<a href="{{ settings.master_url }}ajax/set_language.php?language=de" class="language">Deutsch</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=en" class="language">English</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=es" class="language">Espa&ntilde;ol</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=fr" class="language">Fran&ccedil;ais</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=pt" class="language">Portugu&ecirc;s</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=ru" class="language">&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=se" class="language">Svenska</a>
			<a href="{{ settings.master_url }}ajax/set_language.php?language=zh" class="language">&#20013;&#22269;&#30340;的</a>
		</div>
		<div class="navbar navbar-default">
			<div class="navbar-header">
				<a class="navbar-brand" href="#">{{ settings.company_name }}</a>
			</div>
			<div class="navbar-collapse navbar-responsive-collapse collapse" style="height: 1px;">
				<ul class="nav navbar-nav navbar-right">
					<li><a href="{{ settings.master_url }}servers.php"><i class="fa fa-list-alt"></i></a></li>
					<li><a href="{{ settings.master_url }}logout.php"><i class="fa fa-power-off"></i></a></li>
				</ul>
			</div>
		</div>
		<div class="row">
			<div class="col-3">
				<div class="list-group">
					<a href="{{ settings.master_url }}admin/index.php" id="sidenav_admin-index" class="list-group-item">Admin Index</a>
				</div>
				<div class="list-group">
					<a href="#" class="list-group-item list-group-item-heading"><strong>Settings</strong></a>
					<a href="{{ settings.master_url }}admin/config/global.php" id="sidenav_config-global" class="list-group-item">Global Settings</a>
					<a href="{{ settings.master_url }}admin/config/urls.php" id="sidenav_config-urls" class="list-group-item">URL Settings</a>
					<a href="{{ settings.master_url }}admin/config/email.php" id="sidenav_config-email" class="list-group-item">Email Settings</a>
					<a href="{{ settings.master_url }}admin/config/captcha.php" id="sidenav_config-captcha" class="list-group-item">Captcha Settings</a>
				</div>
				<!--<div class="list-group">
					<a href="#" class="list-group-item list-group-item-heading"><strong>Modules</strong></a>
					<a href="#admin/modules/permissions/index.php" id="sidenav_permissions-index" class="list-group-item">Admin Permissions</a>
					<a href="#admin/modules/modpacks/index.php" id="sidenav_modpacks-index" class="list-group-item">Modpack Manager</a>
					<a href="#admin/modules/backups/index.php" id="sidenav_backups-index" class="list-group-item">Backup Manager</a>
					<a href="#admin/modules/plugins/index.php" id="sidenav_plugins-index" class="list-group-item">Plugin Installer</a>
					<a href="#admin/modules/subaccounts/index.php" id="sidenav_subaccounts-index" class="list-group-item">Subaccounts</a>
				</div>-->
				<div class="list-group">
					<a href="#" class="list-group-item list-group-item-heading"><strong>Account Management</strong></a>
					<a href="{{ settings.master_url }}admin/account/find.php" id="sidenav_account-find" class="list-group-item">Find Account</a>
					<a href="{{ settings.master_url }}admin/account/new.php" id="sidenav_account-new" class="list-group-item">New Account</a>
				</div>
				<div class="list-group">
					<a href="#" class="list-group-item list-group-item-heading"><strong>Server Management</strong></a>
					<a href="{{ settings.master_url }}admin/server/find.php" id="sidenav_server-find" class="list-group-item">Find Server</a>
					<a href="{{ settings.master_url }}admin/server/add.php" id="sidenav_server-add" class="list-group-item">New Server</a>
				</div>
				<div class="list-group">
					<a href="#" class="list-group-item list-group-item-heading"><strong>Node Management</strong></a>
					<a href="{{ settings.master_url }}admin/node/list.php" id="sidenav_node-list" class="list-group-item">List Nodes</a>
					<a href="{{ settings.master_url }}admin/node/add.php" id="sidenav_node-add" class="list-group-item">Add Node</a>
				</div>
			</div>
			{% block content %}{% endblock %}
		</div>
		<div class="footer">
			<div class="row">
				<div class="col-8 ">
					<p>{{ lang.footer_license|raw }}<br />{{ lang.footer_version|format(fversion)|raw }}</p>
				</div>
				<div class="col-4">
					<p class="pull-right">{{ lang.footer_generated|format(footer.seconds) }}<br />{{ lang.footer_queries|format(footer.queries) }}</p>
				</div>
			</div>
			<script type="text/javascript">
				if($.urlParam('tab') != null){$('#config_tabs a[href="#'+$.urlParam('tab')+'"]').tab('show');}
			</script>
		</div>
	</div>
	{% block javascript %}{% endblock %}
	<script type="text/javascript">
		if($.urlParam("error")!=null){var field=$.urlParam("error");var exploded=field.split("|");$.each(exploded,function(key,value){$('[name="'+value+'"]').parent().parent().addClass("has-error")});var obj=$.parseJSON($.cookie("__TMP_pp_admin_updateglobal"));$.each(obj,function(key,value){$('[name="'+key+'"]').val(value)})};
		for(var queryParameters={},queryString=location.search.substring(1),re=/([^&=]+)=([^&]*)/g,m;m=re.exec(queryString);)queryParameters[decodeURIComponent(m[1])]=decodeURIComponent(m[2]);$("a[data-toggle='tab']").click(function(){queryParameters.tab=$(this).attr("href").substring(1),window.history.pushState(null,null,location.pathname+"?"+$.param(queryParameters))});
	</script>
</body>
</html>
